home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkMovieButton.h.z / VkMovieButton.h
C/C++ Source or Header  |  1996-09-20  |  3KB  |  88 lines

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 1995, Silicon Graphics, Inc.   All Rights Reserved.
  4. //
  5. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6. // the contents of this file may not be disclosed to third parties, copied or
  7. // duplicated in any form, in whole or in part, without the prior written
  8. // permission of Silicon Graphics, Inc.
  9. //
  10. // RESTRICTED RIGHTS LEGEND:
  11. // Use, duplication or disclosure by the Government is subject to restrictions
  12. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15. // rights reserved under the Copyright Laws of the United States.
  16. //
  17. //////////////////////////////////////////////////////////////////////////////
  18.  
  19. #ifndef VKMOVIEBUTTON_H
  20. #define VKMOVIEBUTTON_H
  21.  
  22. // VkMovieButton.h
  23.  
  24. #include <Vk/VkComponent.h>
  25.  
  26.  
  27.  
  28. class VkMovieButton : public VkComponent {
  29.  
  30.   public:
  31.  
  32.     static const char *const activateCallback;
  33.     static const char *const movieFinishedCallback;    
  34.  
  35.     VkMovieButton(const char * name,
  36.           Widget parent,
  37.                   char *movieFilename = NULL,
  38.           char *label=NULL);
  39.  
  40.     virtual ~VkMovieButton();
  41.     virtual const char* className();
  42.  
  43.     void setLabel(char* label=NULL);
  44.     void setAlignment(unsigned char);    
  45.     void setMute (Boolean m=False);
  46.  
  47.     char*   getMovieFileName() const;
  48.     void    setMovieFileName(const char *);
  49.  
  50.     static VkComponent *CreateVkMovieButton(const char *, Widget);
  51.  
  52.     void play();
  53.     void stop();
  54.     void rewind();    
  55.  
  56.   private:
  57.  
  58.     void *_screen;
  59.     
  60.     static XtTranslations _tt;
  61.     static XtActionsRec   _actions[];
  62.     static char           _ttDraw[];
  63.     static String         _defaultResources[];
  64.  
  65.     Pixel     _locate;
  66.     Pixel     _bg;    
  67.     Widget    _form, _lbl;
  68.  
  69.     void lh(Boolean);    
  70.     virtual void resize(Widget, XEvent*);        
  71.  
  72.     void finished(VkCallbackObject *, void *, void *);
  73.     
  74.     // callbacks
  75.     
  76.     static void resizeCB(Widget, XtPointer,  XEvent*, Boolean*);    
  77.     static void ActivateSingleClick(Widget,XButtonPressedEvent*,
  78.                     String*,Cardinal*);
  79.     static void ActivateDblClick(Widget,XButtonPressedEvent*,
  80.                      String*,Cardinal*);
  81.     static void ButtonDown(Widget w, XButtonReleasedEvent*,
  82.                String*, Cardinal*);
  83.     static void lhCB(Widget, XtPointer clientData, XEvent *event, Boolean*);
  84.     static void *RegisterVkMovieButtonInterface();        
  85. };
  86.  
  87. #endif
  88.